package net.huashitong.supervision.excel.dao;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;
import net.huashitong.supervision.excel.Entity.ExcelDataEntity;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class ExcelDataDao extends StringDao<ExcelDataEntity> {

    /**
     * 根据批次号获取数据
     * @param num
     * @return
     */
    public List<ExcelDataEntity> getDataByNum(String num)
    {
        GenericQuery query = createQuery("obj");
        query.append(" and obj.batchNum=:batchNum").setParam("batchNum",num);
        return query.listResult();
    }

}
